home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Jun 90 / MacApp.Tech$ 6⁄22⁄90 / 1480-RE[2] CatchFailures -Jun90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  975 b   |  27 lines  |  [TEXT/GEOL]

  1. Item    5958812                         22-June-90        10:44PDT
  2.  
  3. From:   D4695                           Skywalker Sys, Scott Collins,PRT
  4.  
  5. To:     VANPATTEN                       Van Patten, Don
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    RE[2]:CatchFailures & Methods
  10.  
  11. Don,
  12.  
  13.     The two files in this package present a (C++) object that does failure
  14. handling stuff.  You override the class FailureHandler to create a specific
  15. handler whose Recover function knows how to clean up your messes.  You add a
  16. constructor that can tell the object about your local data.  Then when you
  17. instantiate the object, it posts itself to the failure handler stack.  You can
  18. remove it (Success) by calling its Revoke method.  If you forget, it will
  19. automatically be Revoked when it goes out of scope.  There is an example in the
  20. .h file.
  21.  
  22.     This way of dealing with failures is from a suggestion by Jeff Alger.
  23.  
  24.     hope this helps,
  25.     -- Scott Collins
  26.  
  27.